function cityByProvince( pcode ){
	var callback = $.isFunction( arguments[1] ) ? arguments[1] : $.noop ;
	$.ajax({
		url : '/common/citys?provinceCode='+pcode,
		type : 'get',
		dataType : 'json',
		success : function(data) {
			var cityname = '<option value="">市级</option>';
			if(data.cityList != null && data.cityList.length > 0) {
				$.each(data.cityList, function(index, val) {
					var ccode = val.cityCode;
					var cname = val.cityName;
					cityname += '<option value='+ccode+'>'+cname+"</option>";
				});
			}
			$('#cname').html(cityname);
			
			//重置区县
			var areaname='<option value="">区县</option>';
			$('#area').html(areaname);
			
			callback();
		},
		error: function(){
			var cityname='<option value="">市级</option>';
			$('#cname').html(cityname);
			var areaname='<option value="">区县</option>';
			$('#area').html(areaname);
		}
	});
}

function areaByCity(ccode){
	var callback = $.isFunction( arguments[1] ) ? arguments[1] : $.noop ;
	$.ajax({
		url : '/common/areas?cityCode='+ccode,
		type : 'get',
		dataType : 'json',
		success : function(data) {
			var areaname = '<option value="">区县</option>';
			if(data.areaList != null && data.areaList.length > 0) {
				$.each(data.areaList, function(index, val) {
					var acode = val.areaCode;
					var aname = val.areaName;
					areaname += '<option value='+acode+'>'+aname+"</option>";
				});
			}
			$('#area').html(areaname);
			callback();
		},
		error: function(){
			var areaname='<option value="">区县</option>';
			$('#area').html(areaname);
		}
	});
}